import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '@/views/Home/inxex.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/Login',
    name: 'Login',
    component: () => import('@/views/Login/index.vue')
  },
  {
    path: '/',
    name: Home,
    component: Home,
    children: [
      {
        path: '/',
        component: () => import('@/views/Homepage/index.vue')
      },
      {
        path: 'Distinguish',
        component: () => import('@/views/Distinguish/index.vue')
      },
      {
        path: 'Diagnosis',
        component: () => import('@/views/Diagnosis/index.vue')
      },
      {
        path: 'Prevention',
        component: () => import('@/views/Prevention/index.vue')
      },
      {
        path: 'Search',
        component: () => import('@/views/Search/index.vue')
      },
      {
        path: 'Answer',
        component: () => import('@/views/Answer/index.vue')
      }
    ]
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
